
var rightContentVisible = false;
$(document).ready(function () {
    $("#ancBag,#royalreadyIcon").click(function () {
        if (rightContentVisible == false) {

            $('#hide-div').removeAttr('style');
            $("#show-hide").animate({
                width: "975px"
            }, 1200, function () {
                $("#show-hide").removeClass("tab-areas-close");
                $("#show-hide").addClass("tab-areas-open");
            });
            rightContentVisible = true;
        }
        else if (rightContentVisible == true) {

            $("#show-hide").animate({
                width: "142px"
            }, 900, function () {
                $('#hide-div').css('display', 'none');
                $("#show-hide").removeClass("tab-areas-open");
                $("#show-hide").addClass("tab-areas-close");
            });
            
            rightContentVisible = false;
        }
    });
});

